package com.cndw.kungfu.model.general;

import java.util.ArrayList;
import java.util.List;

import com.cndw.kungfu.config.ConstantsConfig;
import com.cndw.kungfu.ext.XmlProcesser;

public class ModeLog {

	private String typeName;
	private int objectId;
	private int eventId;
	private String typeDescription;

	private static final List<ModeLog> logList = new ArrayList<ModeLog>();

	static {
		load();
	}

	public static synchronized void load() {
		if (logList.isEmpty()) {
			logList.addAll(XmlProcesser.processXml(ModeLog.class, ConstantsConfig.getLocaleResource()+"playerLog.xml"));
		}
	}

	public static synchronized void updateConfig() {
		logList.clear();
		load();
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public int getObjectId() {
		return objectId;
	}

	public void setObjectId(int objectId) {
		this.objectId = objectId;
	}

	public int getEventId() {
		return eventId;
	}

	public void setEventId(int eventId) {
		this.eventId = eventId;
	}

	public String getTypeDescription() {
		return typeDescription;
	}

	public void setTypeDescription(String typeDescription) {
		this.typeDescription = typeDescription;
	}

	public static List<ModeLog> getLoglist() {
		return logList;
	}

}
